<template>
  <i :class="iconClass"></i>
</template>

<script>

export default {
  name: 'Icon',
  props: {
    // 图标类型
    type: {
      type: String,
      default: 'iconfont'
    },
    // 图标
    icon: {
      type: String
    }
  },
  computed: {
    iconClass () {
      if (this.type === 'iconfont') {
        return `iconfont ${this.icon}`
      }
      return null
    }
  }
}
</script>

<style scoped lang="scss">

</style>
